package com.lzp.badminton.mapper;

import com.lzp.badminton.model.Club;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzp.badminton.vo.ClubUserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2022-02-11
 */
@Repository
public interface ClubMapper extends BaseMapper<Club> {
    @Select("SELECT u.user_name, u.user_avatar, u.nickname, c.* from user u, club c WHERE c.club_master = u.user_id and c.club_id = #{clubId}")
    ClubUserVo getClubInfoById(@Param("clubId") int clubId);
}
